package com.xiyi.shouxin.entity.admin.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.lang.Nullable;

import com.xiyi.shouxin.entity.admin.RoleMenuRef;

public class RoleMenuRefMapper implements RowMapper<RoleMenuRef> {
    @Override
    @Nullable
    public RoleMenuRef mapRow(@Nullable ResultSet rs, int rowNum) throws SQLException {
        RoleMenuRef ref = new RoleMenuRef();
        if (rs == null) {
            return ref;
        }
        ref.setId(rs.getLong("id"));
        ref.setRoleId(rs.getLong("role_id"));
        ref.setMenuId(rs.getLong("menu_id"));
        return ref;
    }
}
